1. Field of the Invention
Embodiments of the present invention generally relate to a method and apparatus for reducing ringing artifacts.
2. Description of the Related Art
Ringing artifacts reduction techniques can usually be classified into two categories: transform domain methods and spatial domain methods. Transform domain methods are usually more accurate. However, in some cases, transform coefficients may not be available, e.g., for blocks after video decoding, in which the transform coefficients are already lost. For this case, we have to detect ringing artifacts on the spatial domain. On the other hand, transform domain methods are usually more complicated. Below we briefly describe some related work in these two categories.
In the current image and video compression standards, such as JPEG for image and MPEG and H.26× for video, signals are usually divided into fixed-size blocks (usually 8×8), transformed, quantized, followed by an entropy coding of the transform coefficients. Coarser quantization stepsize is usually used for high frequency coefficients, in order to achieve compression gain (saving bits) but ringing artifacts can be introduced if the signal being transformed has hard transitions, as shown in the example of FIG. 1. Therefore, to work directly on the transform coefficients, i.e., to perform detection in the transform domain, is usually the most straightforward and efficient method to detect ringing artifacts.
As discussed above, spatial domain methods do not rely on the MPEG coding parameters. In this scheme, processing is performed within each 3×3 window and separately in the vertical and horizontal directions. A threshold is used to determine the horizontal and vertical correlations within the 3×3 window, and a 3-tap or 2-tap low-pass filter is then adaptively selected according to the level of the detected spatial correlation. Although this scheme is simple to implement, it is not sufficient to remove ringing artifacts, mainly due to the small size kernel used.
Another method improves the performance of ringing artifacts reduction by making use of the information in a bigger window with size of 15×15. The neighboring pixel difference within each 3×3 window is first calculated. This value is then compared to the maximum difference of neighboring pixels in each 15×15 window to determine if there likely exists an edge within the 3×3 window, or outside the 3×3 window but within the 15×15 window, or there is no edge within the 15×15 window. Nonlinear low-pass filtering is then applied to the pixel, if the there exists an edge within the 15×15 window but there is no edge within the 3×3 window. The scheme can achieve better performance in terms of ringing artifacts reduction, but, like most de-ringing algorithms, it suffers from over smoothing details during ringing artifacts removal.
Other methods are intended to overcome this by combining de-ringing and edge sharpening filters into a single filter. In this method, each pixel is first classified as one of the three types: “Visual non-edge pixel substantially surrounded by visual non-edge pixels”, “Visual edge pixels”, and “Visual non-edge pixels substantially surrounded by edge pixels”. This is achieved by comparing the sum of edge strength in each 3×3 window, which is calculated based on the gradients measurement using the Roberts operators, with some pre-defined threshold. De-ringing filtering, sharpening filtering, and no processing are performed to those three types of pixels, respectively. De-ringing filtering output is simply the average over the non-edge pixels within the 3×3 window. The sharpening filter is a nonlinear filter, also performed within the 3×3 window. The drawback of this method is, still, over smoothing edges, together with poor quality of removing ringing artifacts. This is because the de-ringing filtering is applied to each 3×3 window, which is usually not large enough since ringing artifacts can spread beyond it.
Another spatial-domain scheme uses a larger window with the size of 5×5. It also makes use of the edge information within a 16×16 MB to guide the low-pass filtering. It performs better performance the above-mentioned methods. However, the algorithm used to detect edge is too simple, which can hardly differentiate between busy details and true edges. In addition, the horizontal and vertical filtering is performed separately, which usually does not perform as well as a non-separate filter.
Some fuzzy filtering utilizes a 5×5 kernel. However, the performance of the fuzzy filter heavily depends on the chosen threshold. In addition, such algorithm tends to smooth picture details due to the simple edge strength detection scheme used.
In other words, ringing artifact in video is caused by compression, which is introduced by the removal of high-frequency information and, thus, appears as oscillations in an image. Thus, there is a need for an improved method and apparatus for reducing ringing artifacts, while preserving picture details.